﻿using System;
using System.Data;

public partial class manager_taskexec_Default : System.Web.UI.Page
{
    public string num_1 = "0";
    public string num_2 = "0";
    public string num_3 = "0";

    DBHelper db = new DBHelper();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindData();
        }
    }
    private void bindData()
    {
        string zx_psid = Session[AppConfig.SESSION_USER_PSID].ToString();


        DataTable dt = db.getList("select * from v_A_Task where state=1  and zx_psid='" + zx_psid + "'  order by id desc");
        rpt_Listask1.DataSource = dt;
        rpt_Listask1.DataBind();
        num_1 = dt.Rows.Count.ToString();

        DataTable dt2 = db.getList("select * from v_A_Task where state=2  and zx_psid='" + zx_psid + "'  order by id desc");
        rpt_Listask2.DataSource = dt2;
        rpt_Listask2.DataBind();
        num_2 = dt2.Rows.Count.ToString();

        DataTable dt3 = db.getList("select * from v_A_Task where state=3  and zx_psid='" + zx_psid + "'  order by id desc");
        rpt_Listask3.DataSource = dt3;
        rpt_Listask3.DataBind();
        num_3 = dt3.Rows.Count.ToString();

    }
}